package com._复习;

import java.util.Random;

public class Test10 {
    public static void main(String[] args) {
        Random a = new Random();
        int[] arr = new int[a.nextInt(5) + 1];
        int[] arr2 = new int[a.nextInt(5) + 1];
        int[] arrhe = new int[arr.length + arr2.length];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = a.nextInt(100) + 1;
            System.out.print(arr[i] + " ");
        }
        System.out.println(" ");

        for (int i = 0; i < arr2.length; i++) {
            arr2[i] = a.nextInt(100) + 1;
            System.out.print(arr2[i] + " ");

        }
        System.out.println(" ");

        for (int i = 0; i < arrhe.length; i++) {
            if (i < arr.length) {
                arrhe[i] = arr[i];
            } else {
                arrhe[i] = arr2[i - arr.length];
            }
        }

        for (int i = 0; i < arrhe.length; i++) {
            System.out.print(arrhe[i] + " ");

        }

    }

}
